package com.example.learn.service.impl;


import com.example.learn.mapper.ProductMapper;
import com.example.learn.pojo.Product;
import com.example.learn.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class ProductServiceImpl implements ProductService {

    @Autowired
    ProductMapper productMapper;

    @Override
    public List<Product> getProductList(String productName, String orderNo, String inventory) {
        return productMapper.getProductList(productName, orderNo, inventory);
    }

    @Override
    public int addProduct(Product product) {
        return productMapper.addProduct(product);
    }

    @Override
    public int updateProduct(Product product) {
        return productMapper.updateProduct(product);
    }

    @Override
    public int delProductById(String id) {
        return productMapper.delProductById(id);
    }
}
